<?php include($folder.'/layouts/templates/backend/header.tpl') ?>
<?php
$master['toolbarItems'] = array(
	'<input type="button" class="button" onclick="javascript:location.href=\''.$prefix.'/adminisztracio/galeriak/modositas\'" value="Új galéria" />',
	'<input type="button" value="Vissza" class="button" onclick="javascript:window.location.href=\''.$prefix.'/adminisztracio\'" />'
);
?>
<script type="text/javascript">
function GalleryDelete(galleryID)
{
	if (confirm('Biztos, hogy törölni szeretnéd?')) 
	{ 
		SubmitForm('gallery_delete', {'galleryToDelete':galleryID}) 
	}
}
</script>
<?php include($folder.'/layouts/templates/backend/middle.tpl') ?>
<?php if (!empty($_SESSION['id'])): ?>
<input type="hidden" name="galleryToDelete" id="galleryToDelete" />
<?php $content['itemsPerPage'] = 18; ?>
<?php echo extendedTable(array(
	'header' => paginator(array(
		'id' => 'main',
		'selectCountMethod' => 'galeriak_select_count',
		'itemsPerPageAll' => array(9, 18, 36, 72),
		'itemsPerPage' => $content['itemsPerPage'])),
	'body' => table(array(
		'id' => 'main',
		'selectMethod' => 'galeriak_select',
		'block' => 0,
		'itemsPerPage' => $content['itemsPerPage'],
		'sortColumn' => 'actualName',
		'sortDirection' => 'asc',
		'columns' => array(
			array('title'=>'mappa', 'template'=>'{parentName}', 'width'=>'110px', 'align'=>'left', 'sortColumn'=>'parentName'),
			array('title'=>'galéria', 'template'=>'{actualName}', 'width'=>'300px', 'align'=>'left', 'sortColumn'=>'actualName'),
			array('title'=>'művelet',
				'template'=>'<a href="'.$prefix.'/adminisztracio/galeriak/modositas?id={actualID}">módosítás</a>
							 <a href="javascript:GalleryDelete({actualID})">törlés</a>',
				'width'=>'150px', 'align'=>'center', 'sortColumn'=>'')
		))),
	'footer' => paginator(array(
		'id' => 'main',
		'selectCountMethod' => 'galeriak_select_count',
		'itemsPerPageAll' => array(9, 18, 36, 72),
		'itemsPerPage' => $content['itemsPerPage'])))) ?>
<?php endif; ?>
<?php include($folder.'/layouts/templates/backend/footer.tpl') ?>